<?php
    define('DB_HOST', 'localhost');
    define('DB_DATBASE', 'exam');
    define('DB_USER', 'sophy');
    define('DB_PASSWORD', '123456');
    define('DB_PORT', 5432);

    $pgdb = pg_connect(
            sprintf("host=%s port=%s dbname=%s user=%s password=%s",
            DB_HOST, DB_PORT, DB_DATBASE, DB_USER, DB_PASSWORD
        ));

    if (!$pgdb) {
        die('Fail connection');
    }

    include_once 'functions.php';
